<!doctype html>
<html>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width initial-scale=1'>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link rel="stylesheet" href="markdown.css?v=1578879025065"/>
    <title>Spring boot params test</title>
</head>
<body>
<div class="markdown-body">
    <h1>Spring boot params test</h1>
<h2>Test Normal param binding</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testNormalParams/binding</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Test Normal param binding</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>name</td><td>string</td><td>name</td><td>true</td><td>-</td></tr>
<tr><td>age</td><td>int32</td><td>age</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/testNormalParams/binding?name=明杰.贺&amp;age=26'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestBody User</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestBody</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/json; charset=utf-8</code></p>
<p><strong>Description:</strong> Test @RequestBody User</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>userDetails</td><td>array</td><td>用户详情</td><td>false</td><td>-</td></tr>
<tr><td>└─githubAddress</td><td>string</td><td>测试</td><td>false</td><td>-</td></tr>
<tr><td>userList</td><td>array</td><td>用户列表</td><td>false</td><td>-</td></tr>
<tr><td>userName</td><td>string</td><td>用户名</td><td>false</td><td>-</td></tr>
<tr><td>nickName</td><td>string</td><td>昵称</td><td>false</td><td>-</td></tr>
<tr><td>userAddress</td><td>string</td><td>用户地址</td><td>false</td><td>-</td></tr>
<tr><td>userAge</td><td>int32</td><td>用户年龄</td><td>false</td><td>-</td></tr>
<tr><td>phone</td><td>string</td><td>手机号</td><td>false</td><td>-</td></tr>
<tr><td>createTime</td><td>int64</td><td>创建时间</td><td>false</td><td>-</td></tr>
<tr><td>small</td><td>float</td><td>钱少</td><td>false</td><td>-</td></tr>
<tr><td>money</td><td>double</td><td>钱太多了</td><td>false</td><td>-</td></tr>
<tr><td>ipv6</td><td>string</td><td>ipv6</td><td>false</td><td>-</td></tr>
<tr><td>telephone</td><td>string</td><td>固定电话</td><td>false</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/testRequestBody --data '{
	&quot;userDetails&quot;:[
		{
			&quot;githubAddress&quot;:&quot;Apt. 418 夏栋04660号， 威海， 新 440255&quot;
		}
	],
	&quot;userList&quot;:[
		{
			&quot;$ref&quot;:&quot;..&quot;
		}
	],
	&quot;userName&quot;:&quot;明杰.贺&quot;,
	&quot;nickName&quot;:&quot;maxima.veum&quot;,
	&quot;userAddress&quot;:&quot;Apt. 418 夏栋04660号， 威海， 新 440255&quot;,
	&quot;userAge&quot;:26,
	&quot;phone&quot;:&quot;15749065731&quot;,
	&quot;createTime&quot;:1578879027660,
	&quot;small&quot;:59.85,
	&quot;money&quot;:6.60,
	&quot;ipv6&quot;:&quot;0578:8121:f88e:0f5e:0b7f:3926:a6c7:3c3b&quot;,
	&quot;telephone&quot;:&quot;15749065731&quot;
}
'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestBody Map</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestBodyMap</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/json; charset=utf-8</code></p>
<p><strong>Description:</strong> Test @RequestBody Map</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>userDetails</td><td>array</td><td>用户详情</td><td>false</td><td>-</td></tr>
<tr><td>└─githubAddress</td><td>string</td><td>测试</td><td>false</td><td>-</td></tr>
<tr><td>userList</td><td>array</td><td>用户列表</td><td>false</td><td>-</td></tr>
<tr><td>userName</td><td>string</td><td>用户名</td><td>false</td><td>-</td></tr>
<tr><td>nickName</td><td>string</td><td>昵称</td><td>false</td><td>-</td></tr>
<tr><td>userAddress</td><td>string</td><td>用户地址</td><td>false</td><td>-</td></tr>
<tr><td>userAge</td><td>int32</td><td>用户年龄</td><td>false</td><td>-</td></tr>
<tr><td>phone</td><td>string</td><td>手机号</td><td>false</td><td>-</td></tr>
<tr><td>createTime</td><td>int64</td><td>创建时间</td><td>false</td><td>-</td></tr>
<tr><td>small</td><td>float</td><td>钱少</td><td>false</td><td>-</td></tr>
<tr><td>money</td><td>double</td><td>钱太多了</td><td>false</td><td>-</td></tr>
<tr><td>ipv6</td><td>string</td><td>ipv6</td><td>false</td><td>-</td></tr>
<tr><td>telephone</td><td>string</td><td>固定电话</td><td>false</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/testRequestBodyMap --data '{
	&quot;mapKey&quot;:{
		&quot;userDetails&quot;:[
			{
				&quot;githubAddress&quot;:&quot;Apt. 418 夏栋04660号， 威海， 新 440255&quot;
			}
		],
		&quot;userList&quot;:[
			{
				&quot;$ref&quot;:&quot;..&quot;
			}
		],
		&quot;userName&quot;:&quot;明杰.贺&quot;,
		&quot;nickName&quot;:&quot;maxima.veum&quot;,
		&quot;userAddress&quot;:&quot;Apt. 418 夏栋04660号， 威海， 新 440255&quot;,
		&quot;userAge&quot;:26,
		&quot;phone&quot;:&quot;15749065731&quot;,
		&quot;createTime&quot;:1578879027660,
		&quot;small&quot;:13.86,
		&quot;money&quot;:23.27,
		&quot;ipv6&quot;:&quot;0578:8121:f88e:0f5e:0b7f:3926:a6c7:3c3b&quot;,
		&quot;telephone&quot;:&quot;15749065731&quot;
	}
}
'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestBody List</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestBodyList</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/json; charset=utf-8</code></p>
<p><strong>Description:</strong> Test @RequestBody List</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>ids</td><td>array</td><td>array of user id</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/testRequestBodyList --data '[
	&quot;o1y0e1&quot;,
	&quot;sdsg7f&quot;
]
'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @PathVariable</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/test/{name}/{no}/info</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Test @PathVariable</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>name</td><td>string</td><td>name</td><td>true</td><td>-</td></tr>
<tr><td>no</td><td>string</td><td>no</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/test/明杰.贺/orntui/info'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestParam</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestParam</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Test @RequestParam</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>author</td><td>string</td><td>author</td><td>true</td><td>-</td></tr>
<tr><td>type</td><td>string</td><td>type</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/testRequestParam?author=李睿渊&amp;type=petpts'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestParam with value</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestParamWithValue</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Use@RequestParam binding value is name,but method param name is userName</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>name</td><td>string</td><td>user name</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/testRequestParamWithValue?name=明杰.贺'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test @RequestParam with default value</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testRequestParamWithDefaultVal</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Use@RequestParam binding default value Jordan</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>userName</td><td>string</td><td>user name</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/testRequestParamWithDefaultVal?userName=Jordan'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test much path</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/testMuchPath/get/{userId}; http://localhost:8080/testMuchPath/find/{userId}</code></p>
<p><strong>Type:</strong> <code>GET</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> giteeissues #I1545A</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>userId</td><td>int64</td><td>userId</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X GET -i 'http://localhost:8080/testMuchPath/get/604'
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>
<h2>Test much path much parameter</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/get/{deptId}/{userId}; http://localhost:8080/find/{deptId}/{userId}</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/x-www-form-urlencoded;charset=utf-8</code></p>
<p><strong>Description:</strong> Test much path much parameter</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>userId</td><td>int64</td><td>userId</td><td>true</td><td>-</td></tr>
<tr><td>deptId</td><td>int64</td><td>deptId</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -i http://localhost:8080/get/485/89
</code></pre>
<p><strong>Response-example:</strong></p>
<pre><code>This api return nothing.
</code></pre>

    <footer class="page-footer">
        <span class="copyright">Generated by smart-doc at 2020-01-13 09:30:25</span>
        <span class="footer-modification">Suggestions, contact, support and error reporting on
            <a href="https://gitee.com/sunyurepository/smart-doc" target="_blank">Gitee</a> or
            <a href="https://github.com/shalousun/smart-doc" target="_blank">Github</a>
        </span>
    </footer>
</div>
</body>
</html>